{$contents}

{literal}
<div style="text-align:left; padding:10px;">
<h2>Source</h2>

<pre class="code">
&lt;?php
$selectObject->name = 'OBECT NAME';
$selectObject->id = 'OBJECT ID';
		
$contents = array(
	'type' => 'panel',
	'title' => 'DomFg form items',
	'style' => 'margin: 10px; width: 800px;',
	'layout' => 'table',
	'action' => $this->getUrl('allInputs'),
	'layoutConfig' => array(
		'columns' => 2,
		'columnWidths' => array(150,'*'),
	),
	'items' => array(
		array(
			'type' => 'panel',
			'layout' => 'none',
			'colspan' => 2,
			'items' => array(
				array(
					'type' => 'button',
					'title' => 'Wrong button',
					'name' => 'wrongButton',
					'style' => 'float:right',
					'colspan' => 2,
				),array(
					'type' => 'button',
					'title' => 'Correct button',
					'name' => 'submitForm',
					'style' => 'float:right',
					'colspan' => 2,
				),			
			),
		),
		array(
			'title' => 'Textfield title',
			'type' => 'textField',
			'name' => 'textfield',
			'value' => 'textfield',
		),
		array(
			'title' => 'Textarea title',
			'type' => 'textArea',
			'name' => 'textarea',
			'value' => 'textarea',
		),
		array(
			'title' => 'Number title',
			'type' => 'number',
			'name' => 'number',
			'value' => 10.10,
		),
		array(
			'title' => 'Select title',
			'type' => 'select',
			'name' => 'select',
			'selected' => 'KEY 2',
			'values' => array( 
				array('key'=>'Parent','value'=>'Parent 1', 'level'=>0),
				array('key'=>'Child 1','value'=>'Child 1', 'level'=>1),
				array('key'=>'Child 2','value'=>'Child 2', 'level'=>1),
						
				array('key'=>'KEY 1','value'=>'VALUE 1', 'level'=>1),
				array(0=>'KEY 2', 1=>'VALUE 2', 2=>2),
				'KEY 3' => 'VALUE 3',
				$selectObject,
			),
			'keyProperty' => 'key',
			'property' => 'value',
		),
		array(
			'title' => 'Multi select title',
			'type' => 'multiSelect',
			'name' => 'multiselect',
			'selected' => array('KEY 2','KEY 3'),
			'values' => array( 
				array('key'=>'Parent','value'=>'Parent 1', 'level'=>0),
				array('key'=>'Child 1','value'=>'Child 1', 'level'=>1),
				array('key'=>'Child 2','value'=>'Child 2', 'level'=>1),
							
				array('key'=>'KEY 1','value'=>'VALUE 1', 'level'=>1),
				array(0=>'KEY 2', 1=>'VALUE 2', 2=>2),
				'KEY 3' => 'VALUE 3',
				$selectObject,
			),
			'keyProperty' => 'key',
			'property' => 'value',
		),
		array(
			'title' => 'File title',
			'type' => 'file',
			'name' => 'file',
		),
		array(
			'title' => 'CheckBox title',
			'type' => 'checkBox',
			'name' => 'check',
			'checked' => true,
		),
		array(
			'title' => 'Check box group title',
			'type' => 'checkBoxGroup',
			'name' => 'checkboxgroup',
			'checked' => array('KEY 2'=>true,'KEY 3'=>true),
			'values' => array( 
				array('key'=>'KEY 1','value'=>'VALUE 1'),
				array(0=>'KEY 2', 1=>'VALUE 2'),
				'KEY 3' => 'VALUE 3',
				$selectObject,
			),
			'keyProperty' => 'key',
			'property' => 'value',
		),
		array(
			'title' => 'Vertical checkbox group title',
			'type' => 'checkBoxGroup',
			'name' => 'vcheckboxgroup',
			'vertical' => true,
			'checked' => array('KEY 2'=>true,'KEY 3'=>true),
			'values' => array( 
				array('key'=>'KEY 1','value'=>'VALUE 1'),
				array(0=>'KEY 2', 1=>'VALUE 2'),
				'KEY 3' => 'VALUE 3',
				$selectObject,
			),
			'keyProperty' => 'key',
			'property' => 'value',
		),
		array(
			'title' => 'Radio group title',
			'type' => 'radioGroup',
			'name' => 'radiogroup',
			'selected' => 'KEY 2',
			'values' => array( 
				array('key'=>'KEY 1','value'=>'VALUE 1'),
				array(0=>'KEY 2', 1=>'VALUE 2'),
				'KEY 3' => 'VALUE 3',
				$selectObject,
			),
			'keyProperty' => 'key',
			'property' => 'value',
		),
		array(
			'title' => 'Vertical radio group title',
			'type' => 'radioGroup',
			'name' => 'vradiogroup',
			'vertical' => true,
			'selected' => 'KEY 2',
			'values' => array( 
				array('key'=>'KEY 1','value'=>'VALUE 1'),
				array(0=>'KEY 2', 1=>'VALUE 2'),
				'KEY 3' => 'VALUE 3',
				$selectObject,
			),
			'keyProperty' => 'key',
			'property' => 'value',
		),
		array(
			'title' => 'Range title',
			'type' => 'range',
			'name' => 'range',
			'textBefore' => 'min',
			'textMiddle' => 'px max',
			'textAfter' => 'px',
			'value1' => 10,
			'value2' => 15
		),
		array(
			'title' => 'Date title',
			'type' => 'date',
			'name' => 'date',
		),
		array(
			'title' => 'DateTime title',
			'type' => 'dateTime',
			'name' => 'datetime'
		),
		array(
			'type' => 'title',
			'value' => 'HtmlEditor',
			'style' => 'text-align:left',
			'colspan' => 2,
		),
		array(
			'type' => 'htmlEditor',
			'value' => 'HtmlEditor',
			'colspan' => 2,
		),
		array(
			'type' => 'title',
			'value' => 'Button title',
		),
		array(
			'type' => 'button',
			'name' => 'Button',
			'title' => 'Button',
		),
	),
	'buttons' => array(
		array(
			'name' => 'Button1',
			'title' => 'Button 1',
		),
		array(
			'name' => 'Button2',
			'title' => 'Button 2',
		),
		array(
			'name' => 'Button3',
			'title' => 'Button 3',
		),
	),
);
$this->view->contents = DomFg::render( $contents );	
?&gt;
</pre>
</div>
{/literal}